﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="Statistics.aspx.vb" Inherits="VW_Passat_Community.Statistics" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1 class="headline3">
        Statistics</h1>
    <div class="MainStats">
        <h2 class="headline3">
            5 Most Viewed Videos</h2>
        <div class="VideoStatsInstuctions">
            This graph displays the most 5 highest popular viewed Videos on our site, click
            on the link to view the video.
            <br />
        </div>
        <div class="VideoStatsFormLink">
            <br />
            <asp:ListView ID="ListView1" runat="server" DataKeyNames="VideoID" DataSourceID="SqlDataSource2">
                <AlternatingItemTemplate>
                    <strong>Video Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                    <br />
                    <strong>Description:</strong>
                    <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                    <br />
                    <strong>Total Views:</strong>
                    <asp:Label ID="Total_ViewsLabel" runat="server" Text='<%# Eval("[Total Views]") %>' />
                    <br />
                    <br />
                    </span>
                </AlternatingItemTemplate>
                <EditItemTemplate>
                    <span style=""><strong>Video Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:TextBox ID="VideoDescriptionTextBox" runat="server" Text='<%# Bind("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                        <br />
                        <strong>Total Views:</strong>
                        <asp:TextBox ID="Total_ViewsTextBox" runat="server" Text='<%# Bind("[Total Views]") %>' />
                        <br />
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                        <br />
                        <br />
                    </span>
                </EditItemTemplate>
                <EmptyDataTemplate>
                    <span>No data was returned.</span>
                </EmptyDataTemplate>
                <InsertItemTemplate>
                    <br />
                    <strong>Video Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                    <br />
                    <strong>Description:</strong>
                    <asp:TextBox ID="VideoDescriptionTextBox" runat="server" Text='<%# Bind("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                    <br />
                    <strong>Total Views:</strong>
                    <asp:TextBox ID="Total_ViewsTextBox" runat="server" Text='<%# Bind("[Total Views]") %>' />
                    <br />
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                    <br />
                    <br />
                    </span>
                </InsertItemTemplate>
                <ItemTemplate>
                    <span style=""><strong>Video Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                        <br />
                        <strong>Total Views:</strong>
                        <asp:Label ID="Total_ViewsLabel" runat="server" Text='<%# Eval("[Total Views]") %>' />
                        <br />
                        <br />
                    </span>
                </ItemTemplate>
                <LayoutTemplate>
                    <div id="itemPlaceholderContainer" runat="server" style="">
                        <span runat="server" id="itemPlaceholder" />
                    </div>
                    <div style="">
                    </div>
                </LayoutTemplate>
                <SelectedItemTemplate>
                    <span style=""><strong>Video Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                        <br />
                        <strong>Total Views:</strong>
                        <asp:Label ID="Total_ViewsLabel" runat="server" Text='<%# Eval("[Total Views]") %>' />
                        <br />
                        <br />
                    </span>
                </SelectedItemTemplate>
            </asp:ListView>
        </div>
        <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource2" Width="536px">
            <Series>
                <asp:Series ChartArea="ChartArea1" Name="Series1" XValueMember="VideoTitle" YValueMembers="Total Views">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT TOP 5 Videos.VideoID, Videos.VideoLink, Videos.VideoTitle, Videos.VideoDescription, Videos.DateUploaded, Videos.TimeUploaded, COUNT(Video_Views_Stats.ID) AS [Total Views] FROM (Video_Views_Stats INNER JOIN Videos ON Video_Views_Stats.VideoID = Videos.VideoID) GROUP BY Videos.VideoID, Videos.VideoLink, Videos.VideoTitle, Videos.VideoDescription, Videos.DateUploaded, Videos.TimeUploaded ORDER BY COUNT(Video_Views_Stats.ID) DESC">
        </asp:SqlDataSource>
        <br />
    </div>
    <h2 class="headline5">
        Top 2 Most Liked Images</h2>
    <div class="LikedImages">
        This graph displays the total <em><strong>Likes</strong></em> for two most <em><strong>
            Liked</strong></em> Images.
    </div>
    <div class="TwoMostLikedImages">
        <div class="MostLikedImagesListView">
            <asp:ListView ID="ListView2" runat="server" DataKeyNames="ImageID" DataSourceID="SqlDataSource4"
                Style="text-align: left">
                <AlternatingItemTemplate>
                    <asp:Image ID="Image1" runat="server" Height="200px" ImageUrl='<%# Eval("ImageLink") %>'
                        Width="300px" CssClass="carImage" />
                    <br />
                    <strong>Description:</strong>
                    <asp:Label ID="ImageDescriptionLabel" runat="server" Text='<%# Eval("ImageDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                    <br />
                    <strong>Total Likes:</strong>
                    <asp:Label ID="Total_LikesLabel" runat="server" Text='<%# Eval("[Total Likes]") %>' />
                    <br />
                    <br />
                    </span>
                </AlternatingItemTemplate>
                <EditItemTemplate>
                    <span style="">
                        <asp:Image ID="Image1" runat="server" Height="200px" ImageUrl='<%# Eval("ImageLink") %>'
                            Width="300px" CssClass="carImage" />
                        <br />
                        <strong>Description:</strong>
                        <asp:TextBox ID="ImageDescriptionTextBox" runat="server" Text='<%# Bind("ImageDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                        <br />
                        <strong>Total Likes:</strong>
                        <asp:TextBox ID="Total_LikesTextBox" runat="server" Text='<%# Bind("[Total Likes]") %>' />
                        <br />
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                        <br />
                        <br />
                    </span>
                </EditItemTemplate>
                <EmptyDataTemplate>
                    <span>No data was returned.</span>
                </EmptyDataTemplate>
                <InsertItemTemplate>
                    <asp:Image ID="Image1" runat="server" Height="200px" ImageUrl='<%# Eval("ImageLink") %>'
                        Width="300px" CssClass="carImage" />
                    <br />
                    <strong>Description:</strong>
                    <asp:TextBox ID="ImageDescriptionTextBox" runat="server" Text='<%# Bind("ImageDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                    <br />
                    <strong>Total Likes:</strong>
                    <asp:TextBox ID="Total_LikesTextBox" runat="server" Text='<%# Bind("[Total Likes]") %>' />
                    <br />
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                    <br />
                    <br />
                </InsertItemTemplate>
                <ItemTemplate>
                    <span style="">
                        <asp:Image ID="Image1" runat="server" Height="200px" ImageUrl='<%# Eval("ImageLink") %>'
                            Width="300px" CssClass="carImage" />
                        <br />
                        <strong>Description:</strong>
                        <asp:Label ID="ImageDescriptionLabel" runat="server" Text='<%# Eval("ImageDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                        <br />
                        <strong>Total Likes:</strong>
                        <asp:Label ID="Total_LikesLabel" runat="server" Text='<%# Eval("[Total Likes]") %>' />
                        <br />
                        <br />
                    </span>
                </ItemTemplate>
                <LayoutTemplate>
                    <div id="itemPlaceholderContainer" runat="server" style="">
                        <span runat="server" id="itemPlaceholder" />
                    </div>
                    <div style="">
                    </div>
                </LayoutTemplate>
                <SelectedItemTemplate>
                    <span style="">
                        <asp:Image ID="Image1" runat="server" Height="200px" ImageUrl='<%# Eval("ImageLink") %>'
                            Width="300px" CssClass="carImage" />
                        <br />
                        <strong>Description:</strong>
                        <asp:Label ID="ImageDescriptionLabel" runat="server" Text='<%# Eval("ImageDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                        <br />
                        <strong>Total Likes:</strong>
                        <asp:Label ID="Total_LikesLabel" runat="server" Text='<%# Eval("[Total Likes]") %>' />
                        <br />
                        <br />
                    </span>
                </SelectedItemTemplate>
            </asp:ListView>
        </div>
        <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource4" Width="516px">
            <Series>
                <asp:Series Name="Series1" YValueMembers="Total Likes" XValueMember="ImageDescription">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT TOP 1 Images.ImageID, Images.ImageLink, Images.ImageDescription, Images.DateUploaded, Images.TimeUploaded, COUNT(Image_Likes.ID) AS [Total Likes] FROM (Images INNER JOIN Image_Likes ON Images.ImageID = Image_Likes.ImageIDFK) GROUP BY Images.ImageID, Images.ImageLink, Images.ImageDescription, Images.DateUploaded, Images.TimeUploaded ORDER BY COUNT(Image_Likes.ID) DESC">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server"></asp:SqlDataSource>
    </div>
    <h2 class="headline5">
        Top Most Liked Discussions</h2>
    <div class="MostLikedDiscussionsIntro">
        This graph displays the total <em><strong>Likes</strong></em> for the most <em><strong>
            Liked</strong></em> interesting discussions. To view the discussion in more
        detail, simply click on the Title link which will show you their posts.
        <br />
        <div class="TopDiscussionListView">
            <div class="MostLikedDiscussionListView">
                <asp:ListView ID="ListView3" runat="server" DataSourceID="SqlDataSource5">
                    <AlternatingItemTemplate>
                        <span style=""><strong>Title:</strong> <a href="AddPosts.aspx?id=<%# Eval("DiscussionID") %>">
                            <asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /></a>
                            <br />
                            <strong>Date Created:</strong>
                            <asp:Label ID="DateCreatedLabel" runat="server" Text='<%# Eval("DateCreated") %>' />
                            <br />
                            <strong>Discussion Created by:</strong>
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                            <br />
                            <strong>Total Likes:</strong>
                            <asp:Label ID="Total_LikesLabel" runat="server" Text='<%# Eval("[Total Likes]") %>' />
                            <br />
                            <br />
                        </span>
                    </AlternatingItemTemplate>
                    <EditItemTemplate>
                        <span style="">
                            <br />
                            <strong>Title:</strong> <a href="AddPosts.aspx?id=<%# Eval("DiscussionID") %>">
                                <asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /></a>
                            <br />
                            <strong>Date Created:</strong>
                            <asp:TextBox ID="DateCreatedTextBox" runat="server" Text='<%# Bind("DateCreated") %>' />
                            <br />
                            <strong>Discussion Created by:</strong>
                            <asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>' />
                            <br />
                            <strong>Total Likes:</strong>
                            <asp:TextBox ID="Total_LikesTextBox" runat="server" Text='<%# Bind("[Total Likes]") %>' />
                            <br />
                            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                            <br />
                            <br />
                        </span>
                    </EditItemTemplate>
                    <EmptyDataTemplate>
                        <span>No data was returned.</span>
                    </EmptyDataTemplate>
                    <InsertItemTemplate>
                        <span style=""><strong>Title:</strong> <a href="AddPosts.aspx?id=<%# Eval("DiscussionID") %>">
                            <asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /></a>
                            <br />
                            <strong>Date Created:</strong>
                            <asp:TextBox ID="DateCreatedTextBox" runat="server" Text='<%# Bind("DateCreated") %>' />
                            <br />
                            <strong>Discussion Created by:</strong>
                            <asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>' />
                            <br />
                            <strong>Total Likes:</strong>
                            <asp:TextBox ID="Total_LikesTextBox" runat="server" Text='<%# Bind("[Total Likes]") %>' />
                            <br />
                            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                            <br />
                            <br />
                        </span>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <span style="">
                            <br />
                            <strong>Title:</strong> <a href="AddPosts.aspx?id=<%# Eval("DiscussionID") %>">
                                <asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /></a>
                            <br />
                            <strong>Date Created:</strong>
                            <asp:Label ID="DateCreatedLabel" runat="server" Text='<%# Eval("DateCreated") %>' />
                            <br />
                            <strong>Discussion Posted by:</strong>
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                            <br />
                            <strong>Total Likes:</strong>
                            <asp:Label ID="Total_LikesLabel" runat="server" Text='<%# Eval("[Total Likes]") %>' />
                            <br />
                            <br />
                        </span>
                    </ItemTemplate>
                    <LayoutTemplate>
                        <div id="itemPlaceholderContainer" runat="server" style="">
                            <span runat="server" id="itemPlaceholder" />
                        </div>
                        <div style="">
                        </div>
                    </LayoutTemplate>
                    <SelectedItemTemplate>
                        <span style="">" <strong>Title:</strong> <a href="AddPosts.aspx?id=<%# Eval("DiscussionID") %>">
                            <asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /></a>
                            <br />
                            <strong>Date Created:</strong>
                            <asp:Label ID="DateCreatedLabel" runat="server" Text='<%# Eval("DateCreated") %>' />
                            <br />
                            <strong>Discussion Created by:</strong>
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                            <br />
                            <strong>Total Likes:</strong>
                            <asp:Label ID="Total_LikesLabel" runat="server" Text='<%# Eval("[Total Likes]") %>' />
                            <br />
                            <br />
                        </span>
                    </SelectedItemTemplate>
                </asp:ListView>
            </div>
            <asp:Chart ID="Chart3" runat="server" DataSourceID="SqlDataSource5" Width="501px">
                <Series>
                    <asp:Series Name="Series1" XValueMember="Title" YValueMembers="Total Likes">
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1">
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
            <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT TOP 2 Discussion.DiscussionID, Discussion.Title, Discussion.DateCreated, aspnet_Users.UserName, COUNT(Posts.PostID) AS [Total Likes] FROM ((Discussion INNER JOIN Posts ON Discussion.DiscussionID = Posts.DiscussionIDFK) INNER JOIN aspnet_Users ON Discussion.UserIDFK = aspnet_Users.UserId AND Posts.UserIDFK = aspnet_Users.UserId) GROUP BY Discussion.DiscussionID, Discussion.Title, Discussion.DateCreated, aspnet_Users.UserName ORDER BY COUNT(Posts.PostID) DESC">
            </asp:SqlDataSource>
        </div>
        <div class="preferedFuelType">
            <h2 class="headline5">
                Whats more popular,Petrol or Diesel ?</h2>
            <div class="preferedFuelTypeGraph">
                <div id="displayleft">
                    <asp:ListView ID="ListView4" runat="server" DataSourceID="SqlDataSource6">
                        <AlternatingItemTemplate>
                            <li style="background-color: #FFF8DC;">PreferredFuel:
                                <asp:Label ID="PreferredFuelLabel" runat="server" Text='<%# Eval("PreferredFuel") %>' />
                                <br />
                                Most Popular?:
                                <asp:Label ID="Most_Popular_Label" runat="server" Text='<%# Eval("[Most Popular?]") %>' />
                                <br />
                            </li>
                        </AlternatingItemTemplate>
                        <EditItemTemplate>
                            <li style="background-color: #008A8C; color: #FFFFFF;">PreferredFuel:
                                <asp:TextBox ID="PreferredFuelTextBox" runat="server" Text='<%# Bind("PreferredFuel") %>' />
                                <br />
                                Most Popular?:
                                <asp:TextBox ID="Most_Popular_TextBox" runat="server" Text='<%# Bind("[Most Popular?]") %>' />
                                <br />
                                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                            </li>
                        </EditItemTemplate>
                        <EmptyDataTemplate>
                            No data was returned.
                        </EmptyDataTemplate>
                        <InsertItemTemplate>
                            <li style="">PreferredFuel:
                                <asp:TextBox ID="PreferredFuelTextBox" runat="server" Text='<%# Bind("PreferredFuel") %>' />
                                <br />
                                Most Popular?:
                                <asp:TextBox ID="Most_Popular_TextBox" runat="server" Text='<%# Bind("[Most Popular?]") %>' />
                                <br />
                                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                            </li>
                        </InsertItemTemplate>
                        <ItemSeparatorTemplate>
                            <br />
                        </ItemSeparatorTemplate>
                        <ItemTemplate>
                            <li style="background-color: #DCDCDC; color: #000000;">PreferredFuel:
                                <asp:Label ID="PreferredFuelLabel" runat="server" Text='<%# Eval("PreferredFuel") %>' />
                                <br />
                                Most Popular?:
                                <asp:Label ID="Most_Popular_Label" runat="server" Text='<%# Eval("[Most Popular?]") %>' />
                                <br />
                            </li>
                        </ItemTemplate>
                        <LayoutTemplate>
                            <ul id="itemPlaceholderContainer" runat="server" style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                                <li runat="server" id="itemPlaceholder" />
                            </ul>
                            <div style="text-align: center; background-color: #CCCCCC; font-family: Verdana, Arial, Helvetica, sans-serif;
                                color: #000000;">
                            </div>
                        </LayoutTemplate>
                        <SelectedItemTemplate>
                            <li style="background-color: #008A8C; font-weight: bold; color: #FFFFFF;">PreferredFuel:
                                <asp:Label ID="PreferredFuelLabel" runat="server" Text='<%# Eval("PreferredFuel") %>' />
                                <br />
                                Most Popular?:
                                <asp:Label ID="Most_Popular_Label" runat="server" Text='<%# Eval("[Most Popular?]") %>' />
                                <br />
                            </li>
                        </SelectedItemTemplate>
                    </asp:ListView>
                </div>
            <br />
            <div id="displayleft">
                <asp:Chart ID="Chart4" runat="server" DataSourceID="SqlDataSource6" Width="481px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="PreferredFuel" YValueMembers="Most Popular?"
                            ChartType="Pie">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </div>
            <asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT PreferredFuel, COUNT(PreferredFuel) AS [Most Popular?] FROM UserProfile GROUP BY PreferredFuel">
            </asp:SqlDataSource>
            </div>
        </div>
    </div>
</asp:Content>
